﻿package mortal.game.view.forging.view
{
    import Message.DB.Tables.*;
    import __AS3__.vec.*;
    import com.gengine.utils.*;
    import com.greensock.layout.*;
    import com.mui.controls.*;
    import com.mui.display.*;
    import com.mui.utils.*;
    import extend.language.*;
    import fl.data.*;
    import flash.display.*;
    import flash.events.*;
    import mortal.common.*;
    import mortal.common.global.*;
    import mortal.common.swfPlayer.*;
    import mortal.common.swfPlayer.data.*;
    import mortal.component.gconst.*;
    import mortal.component.window.*;
    import mortal.component.windowTip.*;
    import mortal.game.cache.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.manager.msgTip.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.resource.info.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.resource.tableConfig.*;
    import mortal.game.utils.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.display.*;
    import mortal.game.view.common.item.*;
    import mortal.game.view.common.util.*;
    import mortal.game.view.forging.data.*;
    import mortal.game.view.forging.renderer.*;
    import mortal.game.view.forging.util.*;
    import mortal.game.view.palyer.*;
    import mortal.mvc.core.*;

    public class EquipQualityAdvancePanel extends ForgingPanelBase
    {
        private var _putInEquipText:GImageBitmap;
        private var _equipCombat:BitmapNumberText;
        private var _equipCombatNext:BitmapNumberText;
        private var _qualUpBtn:GButton;
        private var _upFee:GTextFiled;
        private var _reviewText:GTextFiled;
        private var _reviewText2:GTextFiled;
        private var _currNameDesc:GTextFiled;
        private var _currAttrList:GTileList;
        private var _nextAttrList:GTileList;
        private var _consumeItem:BaseItem;
        private var _starSpr:GSprite;
        private var _currStarNum:BitmapNumberText;
        private var _nextStarNum:BitmapNumberText;
        private var _starTxt1:GBitmap;
        private var _starTxt2:GBitmap;
        private var _nextQualEquip:PlayerEquipItem;
        private var _bestReviewEquip:PlayerEquipItem;
        private var _starArr:Array;
        private var _isPropEnough:Boolean;
        private var _advanceEffect:SWFPlayer;
        private var _isPlaying:Boolean;

        public function EquipQualityAdvancePanel(param1:Window = null)
        {
            this._starArr = new Array();
            super(param1);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            var _loc_6:ScaleBitmap = null;
            super.createDisposedChildrenImpl();
            var _loc_1:* = GlobalStyle.textFormatBai;
            _loc_1.size = 14;
            this._putInEquipText = UIFactory.gImageBitmap(ImagesConst.Forging_PutInEquip, 102 + 128, 173 - 56 - 10 - 10, this);
            _currOperEquip = UICompomentPool.getUICompoment(PlayerEquipItem);
            _currOperEquip.setItemStyle(ItemStyleConst.Big, "", 0, 0);
            _currOperEquip.x = 85 + 5 + 130;
            _currOperEquip.y = 165 - 57 - 9 - 10;
            _currOperEquip.isShowArroundEffect = false;
            this.addChild(_currOperEquip);
            this._starSpr = UICompomentPool.getUICompoment(GSprite);
            this.addChild(this._starSpr);
            this._currStarNum = UIFactory.bitmapNumberText(29, (237 - 1), "EquipStarUpgradeNum.png", 18, 22, -1, this, 10);
            this._currStarNum.text = "";
            this._currStarNum.visible = false;
            this._starTxt1 = UIFactory.gBitmap(ImagesConst.EquipStarTxt, 46 - 5, 239 - 2, this);
            this._starTxt1.visible = false;
            this._nextStarNum = UIFactory.bitmapNumberText(290, (237 - 1), "EquipStarUpgradeNum.png", 18, 22, -1, this, 10);
            this._nextStarNum.text = "";
            this._nextStarNum.visible = false;
            this._starTxt2 = UIFactory.gBitmap(ImagesConst.EquipStarTxt, 307 - 5, 239 - 2, this);
            this._starTxt2.x = this._nextStarNum.x + this._nextStarNum.width;
            this._starTxt2.visible = false;
            this._nextQualEquip = UICompomentPool.getUICompoment(PlayerEquipItem);
            this._nextQualEquip.setItemStyle(ItemStyleConst.Big, "", 0, 0);
            this._nextQualEquip.x = 344 - 3;
            this._nextQualEquip.y = 165 - 57;
            this._nextQualEquip.isShowArroundEffect = false;
            this._bestReviewEquip = UICompomentPool.getUICompoment(PlayerEquipItem);
            this._bestReviewEquip.setItemStyle(ItemStyleConst.Small, ImagesConst.EquipItemBg, 5, 5);
            this._bestReviewEquip.x = 12;
            this._bestReviewEquip.y = 10;
            this._bestReviewEquip.isShowArroundEffect = false;
            this.addChild(this._bestReviewEquip);
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.Forging_StrengBestPreview, 6, 55, this));
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(21479), 114 - 5, 353 + 5 - 17, 62, 20, this));
            this._consumeItem = UICompomentPool.getUICompoment(BaseItem);
            this._consumeItem.setItemStyle(ItemStyleConst.Small, ImagesConst.PackItemBg, 2, 2);
            this._consumeItem.x = 114;
            this._consumeItem.y = 353 + 6;
            this.addChild(this._consumeItem);
            var _loc_2:* = GlobalStyle.textFormatBai;
            _loc_2.align = AlignMode.CENTER;
            _loc_2.size = 14;
            this._currNameDesc = UIFactory.gTextField("", 128, 7, 234, 25, this, _loc_2);
            this._reviewText = UIFactory.gTextField("？ ？ ？", 28 + 105, 208 + 34 - 5, 100, 20, this);
            this._equipCombat = UIFactory.bitmapNumberText(133, 245 - 5, "FightInfoNum.png", 12, 15, -1, this);
            this._equipCombat.text = "";
            this._reviewText2 = UIFactory.gTextField("？ ？ ？", 384 + 10, 208 + 34 - 5, 100, 20, this);
            this._equipCombatNext = UIFactory.bitmapNumberText(383 + 10, 245 - 5, "FightInfoNum.png", 12, 15, -1, this);
            this._equipCombatNext.text = "";
            var _loc_3:int = 0;
            while (_loc_3 < 6)
            {
                
                _loc_4 = _loc_3 < 3 ? (23) : (284);
                _loc_5 = 261 + 19 * (_loc_3 % 3);
                _loc_6 = UIFactory.bg(_loc_4, _loc_5, 190, 19, this, ImagesConst.RefreshAttrBg);
                this.pushUIToDisposeVec(_loc_6);
                _loc_3++;
            }
            this._currAttrList = UIFactory.tileList(27, 265 - 5, 200, 67, this);
            this._currAttrList.columnWidth = 186;
            this._currAttrList.rowHeight = 19;
            this._currAttrList.horizontalGap = 0;
            this._currAttrList.verticalGap = 0;
            this._currAttrList.setStyle("skin", new Bitmap());
            this._currAttrList.setStyle("cellRenderer", EquipQualAdvanceAttrCellRenderer);
            this._nextAttrList = UIFactory.tileList(288, 265 - 5, 200, 67, this);
            this._nextAttrList.columnWidth = 186;
            this._nextAttrList.rowHeight = 19;
            this._nextAttrList.horizontalGap = 0;
            this._nextAttrList.verticalGap = 0;
            this._nextAttrList.setStyle("skin", new Bitmap());
            this._nextAttrList.setStyle("cellRenderer", EquipQualAdvanceAttrCellRenderer);
            this._qualUpBtn = UIFactory.gButton(Language.getString(21480), 208, 366, 82, 28, this, "BrownBtn");
            this._qualUpBtn.name = "ForgingModule_qualUpBtn";
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(21481), 325 - 142, 410, 88, 20, this, GlobalStyle.textFormatHuang));
            this._upFee = UIFactory.gTextField("", 411 - 142, 410, 33, 20, this, GlobalStyle.textFormatBai);
            this.pushUIToDisposeVec(UIFactory.gBitmap(ImagesConst.Jinbi_bind, 442 - 142, 409, this));
            this._advanceEffect = UICompomentPool.getUICompoment(SWFPlayer);
            this._qualUpBtn.configEventListener(MouseEvent.CLICK, this.onClickHandler);
            this._qualUpBtn.configEventListener(MouseEvent.MOUSE_OVER, this.onOverHandler);
            this._qualUpBtn.reactionTime = 100;
            _currOperEquip.configEventListener(MouseEvent.CLICK, onEquipClickHandler);
            return;
        }// end function

        override public function updateUI() : void
        {
            super.updateUI();
            return;
        }// end function

        override public function addForgingEquip(param1:PlayerEquipItem) : void
        {
            if (param1 && param1.itemData)
            {
                super.addForgingEquip(param1);
                this.updateReviewQualInfo();
                this.updateStarDesc();
                this.updateNameDesc();
                this.updateCombat();
                this.updateConsumes();
                this.updateBestEquip();
                this.updateAttrList();
                this.addStar();
                if (this._reviewText.visible)
                {
                    this._reviewText.visible = false;
                }
                if (this._reviewText2.visible)
                {
                    this._reviewText2.visible = false;
                }
                if (!this._starSpr.visible)
                {
                    this._starSpr.visible = true;
                }
            }
            return;
        }// end function

        override public function updateForgingInfo() : void
        {
            this.updateReviewQualInfo();
            this.updateStarDesc();
            this.updateNameDesc();
            this.updateAttrList();
            this.updateStar();
            this._equipCombat.text = "" + EquipmentUtil.getEquipCombat(_currOperEquip.itemData);
            if (this._nextQualEquip.itemData != null)
            {
                this.updateConsumes();
                this._nextQualEquip.itemData.extInfo.combat = EquipmentUtil.getEquipCombat(this._nextQualEquip.itemData);
                this.updateCombat();
            }
            this.stopAllEffect();
            this.stopStrengFilterEffect();
            this.playAdvanceEffect();
            this.addStrengFilterEffect();
            return;
        }// end function

        private function onMaxQualHandler() : void
        {
            this._consumeItem.itemData = null;
            this._consumeItem.setAmountLabel("");
            this._upFee.text = "";
            this._equipCombatNext.text = "";
            return;
        }// end function

        private function updateStarDesc() : void
        {
            var _loc_1:DefInfo = null;
            if (_currOperEquip.itemData)
            {
                this._currStarNum.text = _currOperEquip.itemData.extInfo.qual + "";
                this._starTxt1.x = this._currStarNum.x + this._currStarNum.width;
                this._currStarNum.visible = true;
                this._starTxt1.visible = true;
            }
            if (this._nextQualEquip.itemData)
            {
                this._nextStarNum.text = this._nextQualEquip.itemData.extInfo.qual + "";
                this._starTxt2.x = this._nextStarNum.x + this._nextStarNum.width;
                this._nextStarNum.visible = true;
                this._starTxt2.visible = true;
            }
            else
            {
                this._nextStarNum.visible = false;
                this._starTxt2.visible = false;
            }
            return;
        }// end function

        private function updateNameDesc() : void
        {
            this._currNameDesc.htmlText = ItemsUtil.getItemWholeName(_currOperEquip.itemData, true);
            if (this._nextQualEquip.itemData)
            {
            }
            return;
        }// end function

        private function updateReviewQualInfo() : void
        {
            var _loc_5:ItemData = null;
            var _loc_1:* = _currOperEquip.itemData.itemInfo as ItemEquipInfo;
            var _loc_2:* = _currOperEquip.itemData.extInfo.qual;
            var _loc_3:* = _currOperEquip.itemData.itemInfo.level;
            var _loc_4:* = StarAdvanceUtil.getStarMaxLimit(_currOperEquip.itemData);
            if (_loc_2 >= _loc_4)
            {
                this._nextQualEquip.itemData = null;
                this.onMaxQualHandler();
            }
            else if (_loc_2 < _loc_4)
            {
                _loc_5 = this.getQualityData((_loc_2 + 1));
                this._nextQualEquip.itemData = _loc_5;
            }
            return;
        }// end function

        private function getQualityData(param1:int) : ItemData
        {
            var _loc_2:* = new ItemData(_currOperEquip.itemData.itemCode, true);
            _loc_2.extInfo = _currOperEquip.itemData.extInfo.clone();
            _loc_2.extInfo.qual = param1;
            return _loc_2;
        }// end function

        private function updateCombat() : void
        {
            var _loc_1:int = 0;
            this._equipCombat.text = "" + EquipmentUtil.getEquipCombat(_currOperEquip.itemData);
            if (this._nextQualEquip.itemData != null)
            {
                this._nextQualEquip.itemData.extInfo.combat = EquipmentUtil.getEquipCombat(this._nextQualEquip.itemData);
                _loc_1 = this._nextQualEquip.itemData.extInfo.combat;
                this._equipCombatNext.text = _loc_1 + "";
            }
            else
            {
                this._equipCombatNext.text = "";
            }
            return;
        }// end function

        private function updateAttrList() : void
        {
            var _loc_4:int = 0;
            var _loc_5:AttributeData = null;
            var _loc_6:EquipQualAttrData = null;
            var _loc_7:Vector.<AttributeData> = null;
            var _loc_1:* = new DataProvider();
            var _loc_2:* = new DataProvider();
            var _loc_3:* = EquipmentUtil.getStrengthenAttr(_currOperEquip.itemData, true);
            for each (_loc_5 in _loc_3)
            {
                
                _loc_6 = new EquipQualAttrData();
                _loc_6.attrName = GameDefConfig.instance.getAttributeName2(_loc_5.name);
                _loc_6.attrBaseValue = _loc_5.attrBaseValue;
                _loc_6.addPercent = _currOperEquip.itemData.addPercent;
                _loc_6.addValue = _loc_5.attrBaseValue * _loc_6.addPercent;
                _loc_1.addItem(_loc_6);
            }
            this._currAttrList.dataProvider = _loc_1;
            this._currAttrList.drawNow();
            if (this._nextQualEquip.itemData)
            {
                _loc_7 = EquipmentUtil.getStrengthenAttr(this._nextQualEquip.itemData, true);
                for each (_loc_5 in _loc_7)
                {
                    
                    _loc_6 = new EquipQualAttrData();
                    _loc_6.attrName = GameDefConfig.instance.getAttributeName2(_loc_5.name);
                    _loc_6.attrBaseValue = _loc_5.attrBaseValue;
                    _loc_6.addPercent = this._nextQualEquip.itemData.addPercent;
                    _loc_6.addValue = _loc_5.attrBaseValue * _loc_6.addPercent;
                    _loc_2.addItem(_loc_6);
                }
            }
            this._nextAttrList.dataProvider = _loc_2;
            this._nextAttrList.drawNow();
            return;
        }// end function

        private function clearConsumes() : void
        {
            this._consumeItem.itemData = null;
            this._upFee.text = "";
            return;
        }// end function

        private function updateConsumes() : void
        {
            var _loc_5:String = null;
            var _loc_6:int = 0;
            var _loc_7:Array = null;
            var _loc_8:int = 0;
            var _loc_9:int = 0;
            var _loc_10:ItemData = null;
            this.clearConsumes();
            var _loc_1:* = _currOperEquip.itemData.itemInfo.level;
            var _loc_2:* = _currOperEquip.itemData.extInfo.qual;
            var _loc_3:* = EquipmentUtil.getCategoryByEquipType(_currOperEquip.itemData.itemInfo.type);
            var _loc_4:* = EquipAdvanceConfig.instance.getInfo(_loc_1, _loc_2, _loc_3);
            if (_loc_4 != null && this._nextQualEquip.itemData != null)
            {
                _loc_5 = _loc_4.consumeItem;
                _loc_6 = _loc_4.consumeMoney;
                _loc_7 = _loc_5.split("#");
                _loc_8 = int(_loc_7[0]);
                _loc_9 = int(_loc_7[1]);
                _loc_10 = new ItemData(_loc_8);
                this._consumeItem.itemData = _loc_10;
                this._consumeItem.amount = _loc_9;
                this.updateConsumeState();
                this._upFee.text = "" + _loc_6;
                if (_loc_6 > Cache.instance.role.money.coin + Cache.instance.role.money.coinBind)
                {
                    this._upFee.textColor = GlobalStyle.colorHongUint;
                }
                else
                {
                    this._upFee.textColor = GlobalStyle.colorBaiUint;
                }
            }
            return;
        }// end function

        override public function updateConsumeState() : void
        {
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            var _loc_4:int = 0;
            var _loc_1:* = this._consumeItem.itemData;
            if (_loc_1)
            {
                _loc_2 = _loc_1.itemInfo.type;
                _loc_3 = this._consumeItem.amount;
                _loc_4 = Cache.instance.pack.backPackCache.getItemCountByItemData(_loc_1);
                if (_loc_3 <= _loc_4)
                {
                    this._consumeItem.isGray = false;
                    this._isPropEnough = true;
                }
                else
                {
                    this._consumeItem.isGray = true;
                    this._isPropEnough = false;
                }
            }
            return;
        }// end function

        override public function updateMoneyState() : void
        {
            var _loc_1:int = 0;
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            var _loc_4:TEquipAdvance = null;
            var _loc_5:int = 0;
            if (_currOperEquip.itemData)
            {
                _loc_1 = _currOperEquip.itemData.itemInfo.level;
                _loc_2 = _currOperEquip.itemData.extInfo.qual;
                _loc_3 = EquipmentUtil.getCategoryByEquipType(_currOperEquip.itemData.itemInfo.type);
                _loc_4 = EquipAdvanceConfig.instance.getInfo(_loc_1, _loc_2, _loc_3);
                if (_loc_4 != null && this._nextQualEquip.itemData != null)
                {
                    _loc_5 = _loc_4.consumeMoney;
                    if (_loc_5 > Cache.instance.role.money.coin + Cache.instance.role.money.coinBind)
                    {
                        this._upFee.textColor = GlobalStyle.colorHongUint;
                    }
                    else
                    {
                        this._upFee.textColor = GlobalStyle.colorBaiUint;
                    }
                }
            }
            return;
        }// end function

        private function updateBestEquip() : void
        {
            var _loc_1:* = _currOperEquip.itemData.itemInfo.level;
            var _loc_2:* = StarAdvanceUtil.getStarMaxLimit(_currOperEquip.itemData);
            var _loc_3:* = this.getQualityData(_loc_2);
            this._bestReviewEquip.itemData = _loc_3;
            this._bestReviewEquip.updateStrengLevel();
            this._bestReviewEquip.itemData.extInfo.combat = EquipmentUtil.getEquipCombat(this._bestReviewEquip.itemData);
            return;
        }// end function

        private function addStar() : void
        {
            var _loc_4:EquipQualAdvanceStarSpr = null;
            this.removeStar();
            var _loc_1:* = _currOperEquip.itemData.itemInfo.level;
            var _loc_2:* = StarAdvanceUtil.getStarMaxLimit(_currOperEquip.itemData);
            var _loc_3:int = 0;
            while (_loc_3 < _loc_2)
            {
                
                _loc_4 = UICompomentPool.getUICompoment(EquipQualAdvanceStarSpr);
                _loc_4.x = 33 * _loc_3;
                this._starSpr.addChild(_loc_4);
                this._starArr.push(_loc_4);
                _loc_3++;
            }
            this._starSpr.x = (494 - this._starSpr.width) / 2 + 2;
            this._starSpr.y = 190 - 1;
            this.updateStar();
            return;
        }// end function

        private function removeStar() : void
        {
            var _loc_1:EquipQualAdvanceStarSpr = null;
            for each (_loc_1 in this._starArr)
            {
                
                _loc_1.dispose();
                _loc_1 = null;
            }
            this._starArr.length = 0;
            return;
        }// end function

        private function updateStar() : void
        {
            var _loc_1:int = 0;
            if (_currOperEquip.itemData.extInfo)
            {
                _loc_1 = _currOperEquip.itemData.extInfo.qual;
            }
            var _loc_2:* = _currOperEquip.itemData.itemInfo.level;
            var _loc_3:* = StarAdvanceUtil.getStarMaxLimit(_currOperEquip.itemData);
            var _loc_4:int = 0;
            while (_loc_4 < _loc_3)
            {
                
                if (_loc_4 < _loc_1)
                {
                    (this._starArr[_loc_4] as EquipQualAdvanceStarSpr).isLight = true;
                }
                else
                {
                    (this._starArr[_loc_4] as EquipQualAdvanceStarSpr).isLight = false;
                }
                _loc_4++;
            }
            return;
        }// end function

        override public function clearUI() : void
        {
            _currOperEquip.itemData = null;
            this._nextQualEquip.itemData = null;
            this._bestReviewEquip.itemData = null;
            this._consumeItem.itemData = null;
            this._bestReviewEquip.updateStrengLevel();
            this._equipCombat.text = "";
            this._equipCombatNext.text = "";
            this._upFee.text = "";
            this._currNameDesc.text = "";
            this._reviewText.visible = true;
            this._reviewText2.visible = true;
            this._currStarNum.visible = false;
            this._starTxt1.visible = false;
            this._nextStarNum.visible = false;
            this._starTxt2.visible = false;
            var _loc_1:* = new DataProvider();
            this._currAttrList.dataProvider = _loc_1;
            this._nextAttrList.dataProvider = _loc_1;
            this._currAttrList.drawNow();
            this._nextAttrList.drawNow();
            this.removeStar();
            return;
        }// end function

        private function onClickHandler(event:MouseEvent) : void
        {
            var _loc_2:String = null;
            if (!_currOperEquip.itemData)
            {
                MsgManager.showRollTipsMsg(Language.getString(21482));
            }
            else
            {
                if (!this._isPropEnough)
                {
                    MsgManager.showRollTipsMsg(Language.getString(21483), MsgRollTipsType.msgRollTips3);
                    return;
                }
                _loc_2 = _currOperEquip.itemData.uid;
                Dispatcher.dispatchEvent(new DataEvent(EventName.EquipQualAdvance, _loc_2));
            }
            return;
        }// end function

        private function onLinkClickHandler(event:MouseEvent) : void
        {
            var _loc_2:* = new WindowTipData();
            _loc_2.type = WindowTipType.DECOMPOSE_EXPLAIN;
            _loc_2.tip = Language.getString(40106);
            _loc_2.title = Language.getString(21484);
            _loc_2.tipW = 500;
            _loc_2.tipH = 500;
            WindowTipManager.showTip(_loc_2);
            return;
        }// end function

        private function onOverHandler(event:MouseEvent) : void
        {
            this._qualUpBtn.toolTipData = this.getToolTipStr();
            return;
        }// end function

        private function onOutHandler(event:MouseEvent) : void
        {
            return;
        }// end function

        private function playAdvanceEffect() : void
        {
            var _loc_1:* = _currOperEquip.itemData.itemInfo.color;
            var _loc_2:* = _loc_1 < ForgingConst.EquipColor_Hong ? ("AdvanceEffect_Back_Cheng.swf") : ("AdvanceEffect_Back_Hong.swf");
            this._advanceEffect.move(120 + 134 - 4, 133 + 4 - 12 - 10);
            this._advanceEffect.load(_loc_2, ModelType.NormalSwf, null);
            this._advanceEffect.framesPlayerCompleteHandler = this.effectEndHandler;
            this.addChild(this._advanceEffect);
            this._isPlaying = true;
            return;
        }// end function

        private function effectEndHandler(param1:SWFPlayer) : void
        {
            this._advanceEffect.framesPlayerCompleteHandler = null;
            this.stopAllEffect();
            return;
        }// end function

        public function stopAllEffect() : void
        {
            if (this._isPlaying)
            {
                this._isPlaying = false;
                this._advanceEffect.stop();
                DisplayUtil.removeMe(this._advanceEffect);
            }
            return;
        }// end function

        private function getToolTipStr() : String
        {
            var _loc_1:String = null;
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            var _loc_4:int = 0;
            if (_currOperEquip.itemData && this._nextQualEquip.itemData)
            {
                _loc_2 = this._equipCombat.value;
                _loc_3 = this._equipCombatNext.value;
                _loc_4 = _loc_3 - _loc_2;
                if (_loc_4 > 0)
                {
                    _loc_1 = Language.getStringByParam(21485, HTMLUtil.addColor("" + _loc_4, GlobalStyle.colorChen));
                }
            }
            return _loc_1;
        }// end function

        private function addStrengFilterEffect() : void
        {
            var _loc_3:EquipQualAdvanceAttrCellRenderer = null;
            var _loc_1:int = 0;
            while (_loc_1 < this._currAttrList.length)
            {
                
                _loc_3 = this._currAttrList.itemToCellRenderer(this._currAttrList.getItemAt(_loc_1)) as EquipQualAdvanceAttrCellRenderer;
                if (_loc_3)
                {
                    _loc_3.addTextEffect();
                }
                _loc_1++;
            }
            _loc_1 = 0;
            while (_loc_1 < this._nextAttrList.length)
            {
                
                _loc_3 = this._nextAttrList.itemToCellRenderer(this._nextAttrList.getItemAt(_loc_1)) as EquipQualAdvanceAttrCellRenderer;
                if (_loc_3)
                {
                    _loc_3.addTextEffect();
                }
                _loc_1++;
            }
            var _loc_2:Array = [FilterConst.colorGlowFilter(GlobalStyle.colorHuang2Uint)];
            EffectManager.glowFilterUnReg(this._equipCombat);
            EffectManager.glowFilterReg(this._equipCombat, _loc_2, 1, 10, 0, 3);
            EffectManager.glowFilterUnReg(this._equipCombatNext);
            EffectManager.glowFilterReg(this._equipCombatNext, _loc_2, 1, 10, 0, 3);
            return;
        }// end function

        private function stopStrengFilterEffect() : void
        {
            var _loc_2:EquipQualAdvanceAttrCellRenderer = null;
            var _loc_1:int = 0;
            while (_loc_1 < this._currAttrList.length)
            {
                
                _loc_2 = this._currAttrList.itemToCellRenderer(this._currAttrList.getItemAt(_loc_1)) as EquipQualAdvanceAttrCellRenderer;
                if (_loc_2)
                {
                    _loc_2.stopTextEffect();
                }
                _loc_1++;
            }
            _loc_1 = 0;
            while (_loc_1 < this._nextAttrList.length)
            {
                
                _loc_2 = this._nextAttrList.itemToCellRenderer(this._nextAttrList.getItemAt(_loc_1)) as EquipQualAdvanceAttrCellRenderer;
                if (_loc_2)
                {
                    _loc_2.stopTextEffect();
                }
                _loc_1++;
            }
            EffectManager.glowFilterUnReg(this._equipCombat);
            EffectManager.glowFilterUnReg(this._equipCombatNext);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._qualUpBtn.name = "";
            this._putInEquipText.dispose(param1);
            this._equipCombat.dispose(param1);
            this._qualUpBtn.dispose(param1);
            this._upFee.dispose(param1);
            _currOperEquip.dispose(param1);
            this._nextQualEquip.dispose(param1);
            this._bestReviewEquip.dispose(param1);
            this._reviewText.dispose(param1);
            this._currNameDesc.dispose(param1);
            this._equipCombatNext.dispose(param1);
            this._reviewText2.dispose(param1);
            this._currAttrList.dispose(param1);
            this._nextAttrList.dispose(param1);
            this._advanceEffect.dispose(param1);
            this._starSpr.dispose();
            this._currStarNum.dispose();
            this._nextStarNum.dispose();
            this._starTxt1.dispose();
            this._starTxt2.dispose();
            this._consumeItem.dispose();
            this._putInEquipText = null;
            this._putInEquipText = null;
            this._equipCombat = null;
            this._qualUpBtn = null;
            this._upFee = null;
            _currOperEquip = null;
            this._nextQualEquip = null;
            this._bestReviewEquip = null;
            this._reviewText = null;
            this._currNameDesc = null;
            this._equipCombatNext = null;
            this._reviewText2 = null;
            this._currAttrList = null;
            this._nextAttrList = null;
            this._advanceEffect = null;
            this._starSpr = null;
            this._currStarNum = null;
            this._nextStarNum = null;
            this._starTxt1 = null;
            this._starTxt2 = null;
            this._consumeItem = null;
            this._isPlaying = false;
            this._isPropEnough = false;
            this.removeStar();
            return;
        }// end function

    }
}
